
#include <stdio.h>
#include "zconf.h"
#include "zlib.h"


int main()
{
	Bytef  buf1[1024];
	Bytef  buf2[2048];
	uLongf len1=1024;
	uLongf len2=2048;
	int i;
	int ret;
	
	for (i=0; i<1024; i++)
		buf1[i] = 'a' + i%26;
	
	if (compressBound(len1) > 2048)
		return 1;
	
	ret = compress(buf2, &len2, buf1, len1);
	if (ret != 0)
		return 2;

	memset(buf1, 0, len1);
	
	ret = uncompress(buf1, &len1, buf2, len2);
	if (ret != 0)
		return 3;
	
	return 0;
}
